<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@include file="/common/common.jsp"%>
<%@include file="/common/skins/skin0/component.jsp" %>
<h:css href="/css/style1/style-custom.css"/>
<%--
- Author(s): pengweiling
- Date: 2012-07-06 11:29:15
- Description:
--%>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>
      选择房间信息表
    </title>
  </head>
  <body>
    <e:datasource name="criteria" type="entity" path="com.primeton.das.criteria.criteraiType" />
    <e:datasource name="page" type="entity" path="com.eos.foundation.PageCond" />
    <queryform id= "ba3d81dd-fce4-41c4-a5d0-58c7a53cde21">
      <h:form  name="query_form" action="com.hms.commonPick.WeRoomSelect.flow" checkType="blur" target="_self" method="post" onsubmit="return checkForm(this);">
        <input type="hidden" name="_eosFlowAction" value="query"/>
          <table align="center" border="0" width="100%" class="form_table">
            <tr>
              <td class="form_label">
                房号
              </td>
              <td colspan="1">
                <h:text property="criteria/_expr[1]/croomno"/>
                <h:hidden property="criteria/_expr[1]/_op" value="like"/>
                <h:hidden property="criteria/_expr[1]/_likeRule" value="all"/>
              </td>
              <td class="form_label">
                建筑编号
              </td>
              <td colspan="1">
                <h:text property="criteria/_expr[2]/cbuilding"/>
                <h:hidden property="criteria/_expr[2]/_op" value="like"/>
                <h:hidden property="criteria/_expr[2]/_likeRule" value="all"/>
              </td>
              <td class="form_label">
                小区
              </td>
              <td colspan="1">
                <h:text property="criteria/_expr[3]/cresidentialarea"/>
                <h:hidden property="criteria/_expr[3]/_op" value="="/>
              </td>
            </tr>
            <tr class="form_bottom">
              <td colspan="6" class="form_bottom">
                <input type="hidden" name="criteria/_entity" value="com.hms.commonPick.data.WeRoomsV">
                每页显示
                <h:text size="2" property="page/length" value="10" validateAttr="minValue=1;maxValue=100;type=integer;isNull=true" />
                <input type="hidden" name="page/begin" value="0">
                <input type="hidden" name="page/isCount" value="true">
                <input type="submit" value="查询" class="button">
              </td>
            </tr>
          </table>
      </h:form>
    </queryform>
    <br/>
    <viewlist id= "9a669115-4f31-4ca8-8520-fc76cfe1a394">
      <h:form name="page_form" action="com.hms.commonPick.WeRoomSelect.flow" method="post">
        <input type="hidden" name="_eosFlowAction" value="query" >
        <h:hiddendata property="criteria" />
        <h:hidden property="page/begin"/>
        <h:hidden property="page/length"/>
        <h:hidden property="page/count"/>
        <h:hidden property="page/isCount"/>
          <table align="center" border="0" width="100%" class="EOS_table">
            <tr>
              <th align="center">
                选择
              </th>
              <th>
                房号
              </th>
              <th>
                建筑编号
              </th>
              <th>
                小区
              </th>
              <th>
                楼层
              </th>
              <th>
                房型
              </th>
              <th>
                面积
              </th>
              <th>
                地址
              </th>
            </tr>
            <w:radioGroup id="group1">
              <l:iterate property="werooms" id="id1">
                <tr class="<l:output evenOutput='EOS_table_row' />">
                  <td align="center">
                    <w:rowRadio>
                      <h:param name="iroomid" iterateId="id1" property="iroomid"/>
                      <h:param name="croomno" iterateId="id1" property="croomno"/>
                      <h:param name="cbuilding" iterateId="id1" property="cbuilding"/>
                      <h:param name="careaname" iterateId="id1" property="careaname"/>
                      <h:param name="carea" iterateId="id1" property="carea"/>     
                      <h:param name="croomtype" iterateId="id1" property="croomtype"/>  
                      
                      <h:param name="cfloor" iterateId="id1" property="cfloor"/> 
                      <h:param name="croomstyle" iterateId="id1" property="croomstyle"/> 
                      <h:param name="iroomnumbers" iterateId="id1" property="iroomnumbers"/>  
                      <h:param name="iacreage" iterateId="id1" property="iacreage"/>                                                   
                      <h:param name="croomstatus" iterateId="id1" property="croomstatus"/>   
                      <h:param name="chkstatus" iterateId="id1" property="chkstatus"/>             
                      <h:param name="cclstatus" iterateId="id1" property="cclstatus"/>   
                      
                      <h:param name="nrate" iterateId="id1" property="nrate"/>  
                      <h:param name="croomcode" iterateId="id1" property="croomcode"/> 
                      <h:param name="cresidentialarea" iterateId="id1" property="cresidentialarea"/> 
                      <h:param name="caddress" iterateId="id1" property="caddress"/> 
                                            
                                                                                        
                    </w:rowRadio>
                  </td>
                  <td>
                    <b:write iterateId="id1" property="croomno"/>
                  </td>
                  <td>
                    <b:write iterateId="id1" property="cbuilding"/>
                  </td>
                  <td>
                    <b:write iterateId="id1" property="cresidentialarea"/>
                  </td>
                  <td>
                    <b:write iterateId="id1" property="cfloor"/>
                  </td>
                  <td>
                    <b:write iterateId="id1" property="croomtype"/>
                  </td>
                  <td>
                    <b:write iterateId="id1" property="iacreage"/>
                  </td>
                  <td>
                    <b:write iterateId="id1" property="caddress"/>
                  </td>
                </tr>
              </l:iterate>
            </w:radioGroup>
            <tr>
              <td colspan="8" class="command_sort_area">
                <div style="float:left">
                <l:greaterThan property="page/size" targetValue="0" compareType="number">
                  <input type="button" value="选择" onclick="selectRecord();" class="button">
                </l:greaterThan>
                <input type="button" value="取消选择值" onclick="unSelectRecord();" class="button">
                <input type="button" value="关闭" onclick="window.close();" class="button">
                </div>
                <div style="float:right">
                  <l:equal property="page/isCount" targetValue="true">
                    共
                    <b:write property="page/count"/>
                    条记录 第
                    <b:write property="page/currentPage"/>
                    页/
                    <b:write property="page/totalPage"/>
                    页
                  </l:equal>
                  <l:equal property="page/isCount" targetValue="false">
                    第
                    <b:write property="page/currentPage"/>
                    页
                  </l:equal>
                  <input type="button" onclick="firstPage('page', 'query', null, null, 'page_form');" value="首页"  <l:equal property="page/isFirst" targetValue="true">disabled</l:equal> >
                  <input type="button" onclick="prevPage('page', 'query', null, null, 'page_form');" value="上页" <l:equal property="page/isFirst" targetValue="true">disabled</l:equal> >
                  <input type="button" onclick="nextPage('page', 'query', null, null, 'page_form');" value="下页" <l:equal property="page/isLast" targetValue="true">disabled</l:equal> >
                  <l:equal property="page/isCount" targetValue="true">
                    <input type="button" onclick="lastPage('page', 'query', null, null, 'page_form');" value="尾页" <l:equal property="page/isLast" targetValue="true">disabled</l:equal> >
                  </l:equal>
                </div>
              </td>
            </tr>
          </table>
      </h:form>
    </viewlist>
    <script>
      window.resize(600, 480);
      window.moveCenter();
      function selectRecord()
      {
        var g = $id("group1");
        if (g.getSelectRow() == null) {
          alert("请选择一行记录");
          return;
        }
        var ret = new Array;
        ret[0] = g.getParam("iroomid");
        ret[1] = g.getParam("croomno");
        
        ret[2] = g.getParam("cbuilding");
        ret[3] = g.getParam("careaname");
        ret[4] = g.getParam("carea");
        ret[5] = g.getParam("croomtype");
        
        ret[6] = g.getParam("cfloor");
        ret[7] = g.getParam("croomstyle");
        ret[8] = g.getParam("iroomnumbers");
        ret[9] = g.getParam("iacreage");
        
        ret[10] = g.getParam("croomstatus");
        ret[11] = g.getParam("chkstatus");
        ret[12] = g.getParam("cclstatus");
        
        ret[13] = g.getParam("nrate");
        ret[14] = g.getParam("croomcode")
        ret[15] = g.getParam("cresidentialarea");
        ret[16] = g.getParam("caddress")        
                                      
        window.returnValue = ret;
        window.close();
      }

      function unSelectRecord()
      {
        var ret = new Array;
        ret[0] = "";
        ret[1] = "";
        window.returnValue = ret;
        window.close();
      }
    </script>
  </body>
</html>
